<template>
  <div>
    <div class="nav_main">
      <router-link to="/find">发现音乐</router-link>
      <router-link to="/my">我的音乐</router-link>
      <br />
      <router-link :to="`/my/recommed?name=${name}`">我的推荐</router-link>
      <router-link :to="`/my/ranking/${username}`">我的排行榜</router-link>
      <router-link to="/my/songlist">我的歌单</router-link>
    </div>
    <div>{{$route.query.chao}}---{{$route.params.wang}}</div>
    <!-- 组件的初始化  运行   销毁 -->
    <div>
      <router-view></router-view>
    </div>
  </div>
</template>

<script>
export default {
  name: "My",
  data() {
    return {
      name: "山寨",
      username: "超哥"
    };
  },
  mounted() {
    console.log(this.$route);
  }
};
</script>

